package com.ruoyi.project.simple.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.simple.mapper.SplSimpleNormMapper;
import com.ruoyi.project.simple.domain.SplSimpleNorm;
import com.ruoyi.project.simple.service.ISplSimpleNormService;

/**
 * 样品指标Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-08-11
 */
@Service
public class SplSimpleNormServiceImpl implements ISplSimpleNormService 
{
    @Autowired
    private SplSimpleNormMapper splSimpleNormMapper;

    /**
     * 查询样品指标
     * 
     * @param simpleNormId 样品指标ID
     * @return 样品指标
     */
    @Override
    public SplSimpleNorm selectSplSimpleNormById(Integer simpleNormId)
    {
        return splSimpleNormMapper.selectSplSimpleNormById(simpleNormId);
    }

    /**
     * 查询样品指标列表
     * 
     * @param splSimpleNorm 样品指标
     * @return 样品指标
     */
    @Override
    public List<SplSimpleNorm> selectSplSimpleNormList(SplSimpleNorm splSimpleNorm)
    {
        return splSimpleNormMapper.selectSplSimpleNormList(splSimpleNorm);
    }

    /**
     * 新增样品指标
     * 
     * @param splSimpleNorm 样品指标
     * @return 结果
     */
    @Override
    public int insertSplSimpleNorm(SplSimpleNorm splSimpleNorm)
    {
        splSimpleNorm.setCreateTime(DateUtils.getNowDate());
        return splSimpleNormMapper.insertSplSimpleNorm(splSimpleNorm);
    }

    /**
     * 修改样品指标
     * 
     * @param splSimpleNorm 样品指标
     * @return 结果
     */
    @Override
    public int updateSplSimpleNorm(SplSimpleNorm splSimpleNorm)
    {
        splSimpleNorm.setUpdateTime(DateUtils.getNowDate());
        return splSimpleNormMapper.updateSplSimpleNorm(splSimpleNorm);
    }

    /**
     * 批量删除样品指标
     * 
     * @param simpleNormIds 需要删除的样品指标ID
     * @return 结果
     */
    @Override
    public int deleteSplSimpleNormByIds(Integer[] simpleNormIds)
    {
        return splSimpleNormMapper.deleteSplSimpleNormByIds(simpleNormIds);
    }

    /**
     * 删除样品指标信息
     * 
     * @param simpleNormId 样品指标ID
     * @return 结果
     */
    @Override
    public int deleteSplSimpleNormById(Integer simpleNormId)
    {
        return splSimpleNormMapper.deleteSplSimpleNormById(simpleNormId);
    }
}
